package com.atguigu.cloud.order.entity;

import com.atguigu.cloud.user.entity.User;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author Taeyang
 * @date 2025/4/4
 */
@Data
@TableName("tb_order")
public class Order {
    private Long id;
    private Long userId;
    private String name;
    private BigDecimal price;
    private Integer num;

    /**
     * MyBatisPlus在自动构建sql语句时不添加这个字段，因为tb_order中没有这个字段，需要后期手动封装
     */
    @TableField(select = false)
    private User user;
}
